﻿@model IEnumerable<store.Category>
<div id="site-menu">
    <div class="container">

        <div class="inner">

            <!-- main menu -->
            <ul class="main-menu menu visible-lg">
                <li class="active">
                    <a href="@Url.Action("Index","Index")"><i class="icon-home"></i></a>
                </li>
                @foreach (var x in Model.Where(x => x.ParentID == 0))
                {
                    <li><a href="@Url.Action("Index", "Category", new { id = x.CategoryID })">@Html.DisplayFor(item => x.Name)</a>
                        <ul>
                            @foreach (var y in Model)
                            {
                                if (x.CategoryID == y.ParentID)
                                {
                                <li><a href="@Url.Action("Index", "Category", new { id = y.CategoryID })">@Html.DisplayFor(item => y.Name)</a></li>
                                }
                            }
                        </ul>
                    </li>
                }
                <li><a href="@Url.Action("Index", "Contact")">Liên hệ</a></li>
            </ul>
            <!-- /main menu -->

        </div>

    </div>
</div>
